package com.guan.trend.service;

import cn.hutool.core.collection.CollUtil;
import com.guan.trend.pojo.IndexData;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName IndexDataService
 * @Author GuanCary
 * @Date 2020/4/20 16:52
 * @Version 1.0
 **/
@Service
@CacheConfig(cacheNames="index_datas")
public class IndexDataService {

    @Cacheable(key="'indexData-code-'+ #p0")
    public List<IndexData> get(String code){
        return CollUtil.toList();
    }
}